<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false"%>
<html>
<head>
    <title>配送员运单下载</title>
</head>
<body>
<div ng-app="myApp" ng-controller="ManLogisticsCtrl">
    <div class="row">
        <ui-container key="logistics-list-00">
            <ui-search-form>
                <search-date format="yyyy-mm" class="col-md-3" name="month" placeholder="请输入订单完结所在月份"   value= "{{dateValue}}" ></search-date>
                <search-input class="col-md-3" name="postmanNo" placeholder="请输入配送员工工号"></search-input>
            </ui-search-form>
        </ui-container>
    </div>
    <div class="row">
        <a class="btn btn-sm btn-primary" href="javascript:void(0);" ng-click="downLoadDatas()" target="_blank" >导出模板</a>
    </div>
</div>
<script>
    angular.module('myApp',['ui.table']);
    angular.module('myApp').controller('ManLogisticsCtrl', function($scope){
        $scope.dateValue=new Date().format("yyyy-MM");

        $scope.downLoadDatas=function(event,param){
            $ajax({
                url:"report/mansalary/down",
                type:"post",
                data:param
            }).done(function(result){
                if(result.code=='0000'){
                    toastr.success("下载成功");
                }else{
                    toastr.error(result.msg);
                }
            }).fail(function (err) {
                
            });

        };


//        $scope.exportDatas = function() {
//            var month=$("input[name='month']");
//            var postmanNo=$("input[name='postmanNo']");
//            var params = {
//                url: 'report/mansalary/down',
//                type: "POST"
//            };
//        };

    });
</script>
</body>
</html>
